package engine.proof.tree;

import java.util.Arrays;

import atom.engine.proof.tree.ProofTreeContentProvider;
import atom.engine.proof.tree.ProofTreeNode;
import atom.tree.Tree;

public class StupidTestLauncher {
	public static void main(String[] args) {
		StupidTestLauncher tester = new StupidTestLauncher();
		tester.test();
	}

	private ProofTreeNode createTreeContent() {
		ProofTreeNode n41 = new ProofTreeNode("I", 4);
		ProofTreeNode n42 = new ProofTreeNode("J", 4);
		ProofTreeNode n43 = new ProofTreeNode("L", 4);
		ProofTreeNode n44 = new ProofTreeNode("M", 4);
		ProofTreeNode n45 = new ProofTreeNode("N", 4);
		ProofTreeNode n31 = new ProofTreeNode("H", 3, Arrays.asList(n41,n42,n43,n44,n45));
		n41.setParent(n31);
		n42.setParent(n31);
		n43.setParent(n31);
		n44.setParent(n31);
		n45.setParent(n31);
		ProofTreeNode n23 = new ProofTreeNode("F", 2, Arrays.asList(n31));
		n31.setParent(n23);
		ProofTreeNode n24 = new ProofTreeNode("G", 2);
		ProofTreeNode n12 = new ProofTreeNode("E", 1, Arrays.asList(n23,n24));
		n23.setParent(n12);
		n24.setParent(n12);
		ProofTreeNode n21 = new ProofTreeNode("D", 2);
		ProofTreeNode n22 = new ProofTreeNode("C", 2);
		ProofTreeNode n11 = new ProofTreeNode("B", 1, Arrays.asList(n21,n22));
		n21.setParent(n11);
		n22.setParent(n11);
		ProofTreeNode root = new ProofTreeNode("A", 1, Arrays.asList(n11,n12));
		return root;
	}
	
	private void test() {
		Tree<ProofTreeNode> tree = new Tree<ProofTreeNode>();
		tree.setContentProvider(new ProofTreeContentProvider());
		ProofTreeNode root = createTreeContent();
		tree.setRoot(root);
		tree.printToConsole();
	}
}
